<?php

namespace app\api\controller;

use app\BaseController;
use app\exception\BusinessException;
use app\helper\Result;

class Index extends BaseController
{
    public function index()
    {
        return Result::success('HI');
    }

    public function hello($name = 'ThinkPHP8')
    {
        return 'hello,' . $name;
    }

    public function test()
    {
        throw new BusinessException('message', 123);
    }

}
